<template>
	<view>
		<view class='pifa acea-row row-middle' :class="{pageOn:bgStyle===1}"
			:style="'margin:0 '+prConfig*2+'rpx;color:'+txtColor+';background-image: url('+baURL+');'">
			<!-- ../../../static/images/news.png -->
			<view class='pictrue skeleton-rect'>
				<!-- <image :src='logoConfig'></image> -->
				{{logoConfig}}
			</view>
			<image :src="newicon" class="tab_icon" mode=""></image>
			<view class="">
				乡村振兴  生态养殖
			</view>
		</view>
		
		
		<view class="pifa_content" :style="'margin:0 '+prConfig*2+'rpx;'">
			 <view class="pifa_list" v-for="(item,index) in list" :style="'background-image: url('+ listbg+');'" @click="Detail(item)">
			 	  <view class="pifa_list_dv">
			 	  	  <view class="left">
			 	  	  	 <view class="title">
			 	  	  	 	{{item.keyword}}
			 	  	  	 </view>
						 <view class="xiantiao">
						 	
						 </view>
						 <view class="msg1">
						 	{{item.store_info}}
						 </view>
						 <!-- <view class="msg2">
						 	{{item.store_info}}
						 </view> -->
						 <view class="price">
						 	&yen; <text>{{item.price}}</text>
						 </view>
			 	  	  </view>
					  <view class="right">
					  	  <image :src="item.image" mode=""></image>
					  </view>
			 	  </view>
			 </view>
		</view>
	</view>
</template>

<script>
	import {getPiFaList} from '@/api/api.js';
	export default {
		name: 'pifa',
		props: {
			dataConfig: {
				type: Object,
				default: () => {}
			},
			isSortType: {
				type: String | Number,
				default: 0
			}
		},
		data() {
			return {
				indicatorDots: false,
				autoplay: true,
				duration: 500,
				// logoConfig: this.dataConfig.logoConfig.url,
				logoConfig: '特别推荐',
				// txtColor: this.dataConfig.txtColor.color[0].item,
				txtColor: '#fff',
				bgColor: this.dataConfig.bgColor.color[0].item,
				bgStyle: this.dataConfig.bgStyle.type,
				prConfig: this.dataConfig.prConfig.val,
				baURL: '../../static/images/Index_banner2.png',
				newicon: '../../static/images/Index_tab_icon3.png',
				listbg:"../../static/images/Index_banner4.png",
				list:[
					
				],
			};
		},
		created() {

			this.getPiFaList();
			// this.list = this.dataConfig.picStyle.picList
		},
		mounted() {
			
		},
		
		methods: {
			Detail(item){
				uni.navigateTo({
					url: '/pages/goods_details/index?id=' + item.id
				})
			},
			getPiFaList: function(){
				getPiFaList().then(res => {
					console.log(res);
					this.list = res.data;
					
				})
			},
			

		}
	}
</script>

<style lang="scss">
	.pageOn {
		border-radius: 12rpx !important;
	}
	
	.pifa_content{
		margin-top: 60rpx !important;
		.pifa_list{
			margin-bottom: 30rpx;
			height: 328rpx;
			background-repeat: no-repeat;
			background-size: cover;
			background-position:center;
			display: flex;
			justify-content: center;
			align-items: center;
			&:nth-of-type(2n){
				.pifa_list_dv{
					flex-direction: row-reverse;
				}
			}
			.pifa_list_dv{
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 530rpx;
			}
	
			.left{
				.title{
					font-size: 40rpx;
					color: #301e00;	
					font-weight: bold;
				}
				.xiantiao{
					margin-top: 27rpx;
					width: 39rpx;
				    height: 3rpx;
					background-color: #301e00;
					margin-bottom: 13rpx;
				}
				.msg1,.msg2{
					font-size: 22rpx;
					color: #301e00;
					line-height: 1.6;
				}
				
				.price{
					margin-top: 25rpx;
					font-size: 28rpx;
					color: #df2e26;
					text{
						font-weight: bold;
						font-size: 33rpx;
					}
				}
			}
			.right{
				width: 212rpx;
				height: 212rpx;
				min-width: 212rpx;
				border-radius: 5px;
				margin-right: 20rpx;
				overflow: hidden;
				image{
					max-width: 100%;
					max-height: 100%;
				}
			}
		}
		
	}

	.pifa {
		display: flex;
		align-items: center;
		flex-wrap: nowrap;
		height: 95rpx;
		margin-top: 45rpx !important;	
		padding: 20rpx 20rpx 0rpx 20rpx;
		background-repeat: no-repeat;
		background-size: cover;
		background-repeat: center;
		position: relative;
		justify-content: space-between;
		
		.tab_icon{
			width: 42rpx;
			height: 38rpx;
			position: absolute;
			left: 26rpx;
		    top: 29rpx;
		}
	}

	.pifa .pictrue {
		width: 205rpx;
		padding-left: 90rpx;
		text-align: left;
		font-family: TCYXHLOGOMH--GB1-0;
		font-size: 40rpx;
		font-weight: normal;
		font-stretch: normal;
		letter-spacing: 1px;
		color: #ffffff;
	    text-shadow: 0px 2px 3px rgba(0,0,0,.26);
		box-sizing: content-box;
		position: relative;
	}

	.pifa .pictrue image {
		width: 100%;
		height: 100%;
	}

	.pifa .swiperTxt {
		width: 375rpx;
		height: 100%;
		line-height: 77rpx;
		overflow: hidden;
		margin-left: 22rpx;
	}

	.pifa .swiperTxt .text {
		width: 89%;
	}

	.pifa .swiperTxt .text .label {
		font-size: 20rpx;
		color: #ff4c48;
		width: 64rpx;
		height: 30rpx;
		border-radius: 40rpx;
		text-align: center;
		line-height: 28rpx;
		border: 2rpx solid #ff4947;
	}

	.pifa .swiperTxt .text .newsTitle {
		width: 100%;
		font-size: 24rpx;
		color: #666;
	}

	.pifa .swiperTxt .iconfont {
		font-size: 28rpx;
		color: #fff;
	}

	.pifa .swiperTxt swiper {
		height: 100%;
	}
</style>
